extends Control

func _on_移动_pressed() -> void:
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_拳师_移动):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.拳师_移动)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()

func _on_怒威神拳_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_拳师_怒威神拳):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.拳师_怒威神拳)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()

func _on_爆裂火拳_pressed():
	ObjectManager.soundManager.play(SoundType.button_click)
	if !GameUtils.checkIsReadyAction() || !GameUtils.checkActionEnough(SpendData.COST_拳师_爆裂火拳):
		return
	ObjectManager.gameManager.operationManager.changeOperationType(OperationType.拳师_爆裂火拳)
	visible = false
	ObjectManager.gameManager.ui.closeDesc()

func _on_移动_mouse_entered() -> void:
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("移动：消耗1点能量，移动到落点")

func _on_怒威神拳_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("怒威神拳：消耗2点能量，移动到落点，如果有敌方大子进行攻击，攻击成功后父系大子获得怯战和位置标记")


func _on_爆裂火拳_mouse_entered():
	var ui = ObjectManager.gameManager.ui as UI
	ui.wantShowDesc("爆裂火拳：消耗2点能量，移动到落点，从落点发出AOE伤害")


func _on_mouse_exited():
	var ui = ObjectManager.gameManager.ui as UI
	ui.closeDesc()
